package com.minimalist.common.config.request;

/**
 * @author 11987
 */
public class UserIdContext{

    private static final ThreadLocal<Long> USER_ID = new ThreadLocal<>();

    public static void setUserId(Long userId){
        USER_ID.set(userId);
    }

    public static Long getUserId(){
        return USER_ID.get();
    }

    public static void clear(){
        USER_ID.remove();
    }
}
